package com.majie.algorithm.linked_list;

public class LinkedListMain {

    public static void main(String[] args) {
        LinkedList<Integer> list = new LinkedList<>();
        for (int i = 0; i < 2; i++) {
            list.add(i);
        }
        System.out.println(list);

//        list.add(6, 434);
//        System.out.println(list);
        Integer remove = list.remove(0);
        System.out.println("删除的元素:" + remove);

        System.out.println(list);
        System.out.println(list.size());
        System.out.println(list.getFirst());
        System.out.println(list.getLast());

        int i = list.indexOf(43);
        System.out.println(i);
    }
}
